<style type="text/css">
	table{
	   font-family: Arial;
       font-size: 10pt;
	}
    .tableTd {
	   	border-width: 0.5pt; 
		border: solid silver; 
        text-align: center;
        /*width: 30px*/
        
	}
	.tableTdContent{
		border-width: 0.5pt; 
		border: solid silver;
        text-align: center;
        /*width: 30px*/
	}
	.titles{
		font-weight: bolder;
        background-color: #B1D6AB;
	}
    .cd{
        font-family: Arial; 
        font-size: 12pt;
    } 
    .cdinfo{
        font-family: Arial; 
        font-size: 12pt;
        color:#0080FF;
    }
    .ds{
        font-family: Arial;
         color:green; 
         font-size: 14pt; 
    }
    .drl{
        width:  38px;
        border-width: 0.5pt; 
		border: solid silver;
    }
    .sndy{
        width:  58px;
        border-width: 0.5pt; 
		border: solid silver;
    }
    .xl{
        width:  32px;
        border-width: 0.5pt; 
		border: solid silver;
        
    }
    .diemtbhk{
        width:  46px;
        border-width: 0.5pt; 
		border: solid silver;
        /*background-color: #B1D6AB;*/
    }
    .hoten{
        width:  140px;
        border-width: 0.5pt; 
		border: solid silver;
    }
    .mssv{
        width:  60px;
        border-width: 0.5pt; 
		border: solid silver;
    }
    .stt{
    width:  30px;
    border-width: 0.5pt; 
	border: solid silver;
    }
    .tieude{
		font-weight: bolder;
        background-color: #B1D6AB;
	}
</style>
<table cellpadding="0" cellspacing="0">
<tr>
    <td colspan="3">ĐOÀN KHOA CÔNG NGHỆ TT&TT</td>
    <td></td>
    <td colspan="6">Cần Thơ, ngày <?php echo date("d");?> tháng <?php echo date("m");?> năm <?php echo date("Y");?></td>
</tr>
<tr>
    <td colspan="4">BCH CHI ĐOÀN <?php echo $user['Z1user']['tenchidoan'];?></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td colspan="4">Số: ….…./CV.ĐTN</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td></td>    
    <td colspan="8" align="center">
        <center class="ds"><b>ĐỀ NGHỊ CÔNG NHẬN <br />
             KẾT QUẢ PHÂN LOẠI ĐOÀN VIÊN, CHI ĐOÀN <br />
        KẾT QUẢ BÌNH XÉT ĐOÀN VIÊN ƯU TÚ</b></center>
    </td>    
    <td></td>
    <td></td>
</tr>
<tr>
    <td></td>
    <td></td>    
    <td colspan="5" align="center"><center>
        Học kỳ: <?php echo substr($session->read('hockyht_ten'),0,1);?>
        - Năm học: <?php echo $session->read('namhocht_ten');?>
        </center>
    </td>    
    <td></td>
    <td></td>
</tr>
<tr>
    <td></td>
    <td></td>
    <td colspan="5" align="center"><center>Kính gởi:	BCH Đoàn Khoa CNTT&TT</center></td>
    <td></td>
    <td></td>
</tr>
<tr>
    <td></td>
    <td colspan="7">Thực hiện theo Hướng dẫn của Đoàn trường và Đoàn khoa, Chi đoàn <?php echo $user['Z1user']['tenchidoan'];?> đã tiến hành họp xét phân loại đoàn viên, bình xét Đoàn viên ưu tú và tự xếp loại chi đoàn với kết quả như sau:</td>
    <td></td>
</tr>
<tr>
    <td></td>
    <td></td>
    <td colspan="3" >Tổng số SV:  <?php echo count($phanloaisvs);?></td>
    
    <td colspan="3">Tổng số ĐV:  <?php echo count($phanloaisvs);?></td> 
    <td></td>
    <td></td>
</tr>
<tr>
    <?php if(count($phanloaisvs)>0):?>
    <td></td>
    <td></td>   
    <td colspan="3">
        <?php echo "+ Xuất sắc: ".$tlxs.'%';?><br />
        <?php echo "+ Khá: ".$tlk.'%';?>
    </td>
    <td colspan="4">
        <?php echo "+ Trung bình: ".$tltb.'%';?><br />
        <?php echo "+ Yếu: ".$tly.'%';?>
    </td>
    <td></td>    
    <td></td>     
    <td></td>
    <?php endif;?>
</tr>
    <tr>
        <td></td>
        <td colspan="2">- Số đoàn viên được bình xét Đoàn viên ưu tú:	<?php echo count($dvutsvs)?></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    </tr>
    <tr>
        <td></td>
        <td colspan="2">- Chi đoàn tự đánh giá, xếp loại: Chi đoàn
        <?php 
            foreach($loaicdsv as $xeploaicd){
                 if($loaicd==$xeploaicd['Xeploaicd']['id']) echo $xeploaicd['Xeploaicd']['loaicd'];   
                }
        ?>
        </td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td colspan="2"><b>I. KẾT QUẢ PHÂN LOẠI ĐOÀN VIÊN:</b></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td colspan="7"><br /></td>
    </tr>
    <tr>    
            <th class="stt" style="font-weight: bolder;background-color: #B1D6AB;" rowspan="2"><?php  __('STT');?></th>
			<th class="mssv" style="font-weight: bolder;background-color: #B1D6AB;" rowspan="2"><?php __('MSSV');?></th>
			<th class="hoten" style="font-weight: bolder;background-color: #B1D6AB;" rowspan="2"><?php __('Họ Tên');?></th>
            <th class="drl" style="font-weight: bolder;background-color: #B1D6AB;" rowspan="2"><?php __('Điểm RL');?></th>
            <th class="diemtbhk" style="font-weight: bolder;background-color: #B1D6AB;" rowspan="2"><?php __('Điểm TBHK');?></th>
            <td class="tableTd" style="font-weight: bolder;background-color: #B1D6AB;" colspan="4"><?php  __('Xếp loại');?></td>
            <th class="tableTd" style="font-weight: bolder;background-color: #B1D6AB;" rowspan="2"><?php __('Ghi chú');?></th>
            
	</tr>
    <tr>    
			<td class="xl" style="font-weight: bolder;background-color: #B1D6AB;"><?php __('XS');?></td>
            <td class="xl" style="font-weight: bolder;background-color: #B1D6AB;"><?php __('Khá');?></td>
            <td class="xl" style="font-weight: bolder;background-color: #B1D6AB;"><?php __('TB');?></td>
            <td class="xl" style="font-weight: bolder;background-color: #B1D6AB;"><?php  __('Yếu');?></td>
            
	</tr>
	<?php
	$i = 0;
	foreach ($phanloaisvs as $phanloaisv):
    $i++;		
	?>
	<tr>
        <td class="stt"><?php echo $i;?></td>    
        <td class="mssv"><?php echo $phanloaisv['Z5plsv']['mssv']; ?></td>
        <td class="hoten"><?php echo $phanloaisv['Z5plsv']['hoten']; ?></td>
		<td class="drl"><?php echo $phanloaisv['Z5plsv']['diemrenluyen']; ?>&nbsp;</td>
		<td class="diemtbhk"><?php echo $phanloaisv['Z5plsv']['diemtbhk']; ?>&nbsp;</td>
        <?php 
                foreach($xeploais as $xeploai):
                if($xeploai['Xeploai']['id']==$phanloaisv['Z5plsv']['xeploai_id'])://echo $form->input('xeploai_id'.$j,array('type'=>'select','label'=>'','options'=>$xeploais,'default'=>$phanloaisv['Z5plsv']['xeploai_id']));
                if($phanloaisv['Z5plsv']['xeploai_id']==1): 
        ?>
        <td class="xl">
			<?php echo "X"?>
		</td>
        <td class="tableTdContent"></td>
        <td class="tableTdContent"></td>
        <td class="tableTdContent"></td>
        <?php elseif($phanloaisv['Z5plsv']['xeploai_id']==2):?>
        <td class="tableTdContent"></td>
        <td class="tableTdContent">
			<?php echo "X";?>
		</td>
        <td class="tableTdContent"></td>
        <td class="tableTdContent"></td>
        <?php elseif($phanloaisv['Z5plsv']['xeploai_id']==3):?>
        <td class="tableTdContent"></td>
        <td class="tableTdContent"></td>
        <td class="tableTdContent">
			<?php echo "X";?>
		</td>        
        <td class="tableTdContent"></td>
        <?php elseif($phanloaisv['Z5plsv']['xeploai_id']==4):?>
        <td class="tableTdContent"></td>
        <td class="tableTdContent"></td>
        <td class="tableTdContent"></td>
        <td class="tableTdContent">
			<?php echo "X";?>
		</td>        
        <?php endif; ?>
        <?php endif; ?>
        <?php endforeach; ?>
        <td class="tableTdContent"><?php echo $phanloaisv['Z5plsv']['ghichu']; ?>&nbsp;</td>
	</tr>
<?php endforeach; ?>
    <tr>
        <td colspan="7"><br /></td>
    </tr>
    <?php if(count($dvutsvs)!=0):?>   
    <tr>
        <td></td>
        <td colspan="2"><b>II. KẾT QUẢ BÌNH XÉT ĐOÀN VIÊN ƯU TÚ:</b></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td colspan="7"><br /></td>
    </tr>
	<tr>
            <td class="tableTd" style="font-weight: bolder;background-color: #B1D6AB;"><?php __('STT');?></th>
			<td class="tableTd" style="font-weight: bolder;background-color: #B1D6AB;"><?php __('MSSV');?></th>
            <td class="tableTd" style="font-weight: bolder;background-color: #B1D6AB;" colspan="3"><?php __('Họ tên');?></th>
			<td class="sndy" style="font-weight: bolder;background-color: #B1D6AB;" colspan="3"><?php __('Số người đồng ý');?></th>
			<td class="tableTd" style="font-weight: bolder;background-color: #B1D6AB;" colspan="2"><?php __('Ghi chú');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($dvutsvs as $dvutsv):
    $i++;		
	?>
	<tr>
        <td class="tableTdContent"><?php echo $i;?></td>
        <td class="tableTdContent"><?php echo $dvutsv['Z1dvutsv']['mssv'];?></td>
        <td class="tableTdContent" colspan="3"><?php echo $dvutsv['Z1dvutsv']['hoten'];?></td>
		<td class="sndy" colspan="3"><?php echo $dvutsv['Z1dvutsv']['songuoidongy'].'/'.$dvutsv['Z1dvutsv']['songuoithamgiabau'];?>&nbsp;</td>
        <td class="tableTdContent" colspan="2"><?php echo $dvutsv['Z1dvutsv']['ghichu'];?></td>	
	</tr>
    <?php endforeach; ?>
    <?php endif;?>
<tr>
    <td></td>
    <td colspan="7">Kính đề nghị Ban chấp hành Đoàn Khoa xem xét công nhận các kết quả phân loại, bình xét trên.</td>
    <td></td>
</tr>
<tr>
    <td></td>
    <td colspan="7">Trân trọng.</td>
    <td></td>
</tr>
<tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td colspan="3"><center>TM. BCH CHI ĐOÀN</center></td>
    
</tr>
<tr>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td colspan="3"><center>BÍ THƯ</center></td>
</tr>

	</table>
<?php 
    echo $form->create('Phanloaisv',array('action'=>'ketquapldv'));
    echo $form->submit('Export');
?>    
